/*
 * @(#)ValidationException.java 1.0.0 27/05/2014 *
 * INTRODUCCION A APLICACIONES J2EE
 * Ing. Darwin Rodrigo Zottola Pareja
 * rodrigozeta@gmail.com - twitter @Monozeta
 */

package com.unt.javawebunt.exception;

import org.apache.log4j.Logger;

/**
 * Exception for persistence Level
 * 
 * @author rzottola
 * @version 1.0
 * @since 27/05/2014
 * 
 */
public class DataAccessLayerException extends ApplicationException {

	/**
	 * seria UID
	 */
	private static final long serialVersionUID = -3143336813469134416L;
	Logger logger = Logger.getLogger(DataAccessLayerException.class);

	public DataAccessLayerException() {
	}

	public DataAccessLayerException(String message) {
		super(message);
		logger.debug("A DAO has thrown an exception - " + message);
	}

	// always has to receive an error number.
	public DataAccessLayerException(int errorNumber, Throwable cause) {
		super(errorNumber, cause);
		logger.debug("A DAO has thrown an exception - " + cause.toString());
	}

	public DataAccessLayerException(String message, Throwable cause) {
		super(message, cause);
		logger.debug("A DAO has thrown an exception - " + message + " - "
				+ cause.toString());
	}
}
